package acwing._1_1AlgorithmBasic._6Greedy;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @Project : AlgorithmLearning
 * @Package : ACWing._1_1AlgorithmBasic._6Greedy
 * @File : Q0900.java
 * @Author : WangRuoyu
 * @Date 2023/11/27 15:06
 */

public class Q0900 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        final int N = Integer.parseInt(br.readLine().split(" ")[0]);
        final int MOD = (int) 1e9 + 7;

        /*** 完全背包模型 无序 组合数 ***/
//        int[] f = new int[N + 1];
//        f[0] = 1;
//        for (int i = 1; i <= N; i++) {
//            for (int j = i; j <= N; j++) {
//                f[j] = (f[j] + f[j - i]) % MOD;
//            }
//        }
//        System.out.println(f[N]);

        /*** 走楼梯模型 有序 排列数 ***/
//        int[] f = new int[N + 1];
//        f[0] = 1;
//        for (int i = 1; i <= N; i++) {
//            for (int j = 1; j <= i; j++) {
//                f[i] = (f[i] + f[i - j]) % MOD;
//            }
//        }
//        System.out.println(f[N]);

        /*** f(i,j)表示和为i且恰好由j个数组成的组合数量 求组合数 ***/
        int[][] f = new int[N + 1][N + 1];
        f[0][0] = 1;
        for (int i = 1; i <= N; i++) {
            for (int j = 1; j <= i; j++) {
                f[i][j] = (f[i - 1][j - 1] + f[i - j][j]) % MOD;
            }
        }
        int res = 0;
        for (int i = 1; i <= N; i++) {
            res = (res + f[N][i]) % MOD;
        }
        System.out.println(res);

    }
}